home *** CD-ROM | disk | FTP | other *** search
-
-
-
- Pfork(2) Oct. 1, 1991 Pfork(2)
-
-
- N✓NA✓AM✓ME✓E
- Pfork - create a copy of the current process
-
- S✓SY✓YN✓NO✓OP✓PS✓SI✓IS✓S
- WORD Pfork();
-
- D✓DE✓ES✓SC✓CR✓RI✓IP✓PT✓TI✓IO✓ON✓N
- _✓P_✓f_✓o_✓r_✓k creates a copy of the current process. The child
- (the new process created) inherits a copy of the parent's
- address space, not the parent's original memory, and so
- changes to variables in the child do not affect the parent
- in any way. The new process begins execution with an
- apparent return from the _✓P_✓f_✓o_✓r_✓k call.
-
- R✓RE✓ET✓TU✓UR✓RN✓NS✓S
- 0 in the child
-
- The new process id (a positive number), in the parent.
-
- ENSMEM if there is not enough memory to create the new
- process.
-
- S✓SE✓EE✓E A✓AL✓LS✓SO✓O
- _✓P_✓e_✓x_✓e_✓c(2), _✓P_✓v_✓f_✓o_✓r_✓k(2)
-
- B✓BU✓UG✓GS✓S
- If the parent is in supervisor mode when this call is
- made, the child will be started in user mode anyway; thus,
- it is strongly recommended that this call be made only
- from user mode.
-
- The current implementation of _✓P_✓f_✓o_✓r_✓k acts like _✓P_✓v_✓f_✓o_✓r_✓k in
- that the parent is suspended until the child either exits
- or overlays itself with _✓P_✓e_✓x_✓e_✓c mode 200. Do not rely on
- this behavior, as it will be changed in future versions of
- MiNT.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Version 0.9 MiNT Programmer's Manual 1
-
-
-